1. Technical Field
The present invention relates to computer systems in general, and in particular to a method for controlling voltages supplied to a processor by a power supply unit. More particularly, the present invention relates to a method for controlling voltages supplied to a processor transitioning between an active state and a sleeping state so as to reduce power consumption.
2. Description of Related Art
The Advanced Configuration and Power Interface (ACPI) specifies several global states, such as G0 state to G2 state, as operating states for a computer system. G0 state is defined as a working state during which a code in a user mode is executed. G1 state is defined as a sleeping state during which a computer operates with less power consumption than that during G0 state. In G1 state, a code in a user mode is not executed, and a computer appears to have stopped its operation to a user. G2 state is defined as a soft-off state during which a computer operates with minimum power consumption, and codes in a user mode and in a system mode are not executed.
The ACPI further specifies an active state and a sleeping state as power states of a system processor in G0 state. The active state, which is defined as C0 state, is a power state during which a processor can execute instructions. The sleeping state, which is defined as any one of C1 state to Cn state, is a power state during which a processor does not execute instructions, and a core voltage and power consumption are less than those during C0 state. The time required to return to C0 state from each one of C1 state to Cn state increases as the power consumption in the state decreases.
There is a conventional method for changing a switching mode of power states for a processor in order to avoid noise generated from a capacitor provided in a DC/DC converter supplying electric power to the processor. Under this method, when a processor cyclically transitions between C4 state and C0 state and if a switching cycle of the power states is shorter than a set cycle, an operating mode of the processor is changed between C3 state and C0 state.
Certain Intel processors can transition up to C6 state. When a processor frequently transitions between C0 state and C6 state, average power consumption will increase because a processor state is to be saved and returned to/from a static memory. Thus, an “Auto-Demote” function is implemented in order to saving power. Under the Auto-Demote function, if a processor transitions to C6 state with frequency of 3 to 4 milliseconds or less, C4 state is kept without transitioning to C6 state.
When an ACPI-compliant operating system (OS) determines that instructions to be processed do not exist and makes a processor execute a HALT instruction, the processor transitions to C1 state. When the OS further determines that instructions to be processed by the processor do not exist even after the transition to C1 state, the OS increases the depth of a sleeping state as in the order of C2 state, C3 state and C4 state. When the processor shifts to a sleeping state, an application program requests the OS to regularly resume the operation of the processor in C0 state regardless of whether there is a thread to be processed or not. The frequency for regularly resuming varies from one application to another.
In order for a processor to receive a voltage suitable for each sleeping state from a DC/DC converter, the processor sends voltage identification data to the DC/DC converter. The DC/DC converter decreases an output voltage with increase in the depth of sleeping states of the processor. Accordingly, when the processor transitions between C0 state and Cn state with a predetermined cycle according to the OS and the application program, the DC/DC converter changes the output voltage in synchronization with the transition of power states and in accordance with the voltage identification data.
At this time, the highest voltage is applied to the processor in C0 state, and a lower voltage is applied cyclically thereto in a sleeping state. An output circuit of the DC/DC converter is connected with a smoothing capacitor in order to decrease ripple of the voltage. When the output voltage is switched from high to low, electric charge accumulated in the smoothing capacitor is discharged, whereas when the output voltage is switched from low to high, electric charge discharged has to be charged, thus generating charging loss. Charging loss generated at the smoothing capacitor due to the switching of the output voltage increases in proportion to the switching cycle of power states.
Since the power consumption of a processor is lower in a sleeping state than in C0 state, power consumption of the processor becomes less in the processor transitioning between C0 state and Cn state than in the processor maintained in C0 state. On the other hand, as the switching cycle is shortened, the charging loss of the capacitor increases. Thus, in order to reduce power consumption of a computer, comprehensive determination has to be made with consideration given to the power consumption of the processor and the charging loss of the smoothing capacitor.
Consequently, it would be desirable to provide a method for controlling voltages supplied to a processor transitioning between an active state and a sleeping state in order to reduce power consumption.